<% f = tab[:form] %>
<%= error_messages_for 'ldap_setting' %>
<div class="box tabular settings">
  <p><%= label_tag :base_settings, l(:field_base_settings) %>
    <%=  select_tag :base_settings, options_for_base_settings %></p>
  <p><%= f.text_field :groups_base_dn, :size => 50 %></p>
  <p><%= f.text_field :class_user, :required => true, :size => 15 %></p>
  <p><%= f.text_field :class_group, :required => true, :size => 50 %></p>
  <p><%= f.text_field :groupname_pattern, :size => 50 %></p>
  <p><%= f.text_field :group_search_filter, :size => 50  %></p>

  <p><%= f.text_field :account_disabled_test, :size => 15 %></p>
  <p><%= f.select :group_membership, options_for_group_membeship %></p>
  <p><%= f.select :nested_groups, options_for_nested_groups %></p>

  <fieldset class="box" id="ldap_attributes">
    <legend><%=l(:label_attribute_plural)%></legend>

    <p><%= f.text_field :groupname, :required => true, :size => 15 %></p>
    <p><%= f.text_field :account_flags, :size => 15 %></p>

    <div class="membership on_groups" style="display:none;">
      <p><%= f.text_field :member, :required => true, :size => 15 %></p>
      <p><%= f.text_field :user_memberid, :required => true, :size => 15%></p>
    </div>
    <div class="membership on_members" style="display:none;">
      <p><%= f.text_field :user_groups, :required => true, :size => 15 %></p>
      <p><%= f.text_field :groupid, :required => true, :size => 15 %></p>
    </div>

    <div class="nested on_members" style="display:none;">
      <p><%= f.text_field :parent_group, :required => true, :size => 15 %></p>
      <p><%= f.text_field :group_parentid, :required => true, :size => 15 %></p>
    </div>

    <div class="nested on_parents" style="display:none;">
      <p><%= f.text_field :member_group, :required => true, :size => 15 %></p>
      <p><%= f.text_field :group_memberid, :required => true, :size => 15 %></p>
    </div>
  </fieldset>
</div>